package com.c.ctgproject.http

import com.c.ctgproject.base.MyBaseApplication
import com.c.ctgproject.mode.VehicleInspection
import com.c.ctgproject.retrofit.Response
import com.c.ctgproject.utils.userToken
import io.reactivex.Observable
import okhttp3.MultipartBody
import okhttp3.RequestBody
import okhttp3.ResponseBody
import retrofit2.Call
import retrofit2.http.*
import java.util.*

/**
 *作者:LiBW
 *创建日期: 2020/8/15
 *描述: Retrofit接口
 */
interface ApiService {
    /**通用文件上传*/
    @Multipart
    @POST("/common/oss/upload")
    fun commonFileUpload(
        @Part file: ArrayList<MultipartBody.Part>,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    /*** 登录*/
    @POST("/urm_v3/user/{loginType}/login")
    fun login(
        @Body Body: RequestBody,
        @Path("loginType") loginType: String = "common"
    ): Observable<ResponseBody>


    /*** Token登录*/
    @POST("/user/loginWithToken")
    fun loginByToken(@Header("token") token: String): Call<ResponseBody>

    /*** 获取角色menu*/
    @GET("/user/loginAs/{roleId}")
    fun characterChange(@Header("token") token: String, @Path("roleId") roleId: Int): Observable<ResponseBody>

    /*** 门卫 获取待入场车辆列表*/
    @GET("/plant/guard/listCarWaitingEntrance")
    fun listCarWaitingEntrance(@Header("token") token: String, @Query("pageNum") pageNum: Int, @Query("pageSize") pageSize: Int, @Query("plateNum") plateNum: String?): Observable<ResponseBody>

    /*** 门卫配件出场列表*/
    @POST("/plant/guard/accessoriesFactory")
    fun doorkeeperPartOutList(@Header("token") token: String, @Body body: RequestBody): Call<ResponseBody>

    /*** 门卫获取物料出场*/
    @POST("/plant/guard/materialInformationList")
    fun doorkeeperMaterialOutList(@Header("token") token: String, @Body body: RequestBody): Call<ResponseBody>

    /*** 门卫确认配件出场*/
    @GET("/plant/guard/partsConfirmFactory")
    fun doorkeeperPartOutConfirm(@Header("token") token: String, @Query("partsSalesOrderId") partsSalesOrderId: Int): Call<ResponseBody>

    /*** 门卫 物料出场确认*/
    @GET("/plant/guard/materialConfirmFactory")
    fun doorkeeperMaterialOutConfirm(@Header("token") token: String, @Query("materialSalesOrderId") materialSalesOrderId: Int, @Query("truckTrafficId") truckTrafficId: Int): Call<ResponseBody>

    /*** 用户修改密码*/
    @FormUrlEncoded
    @PUT("/urm_v3/user/updatePassword")
    fun changePassword(@Header("token") token: String, @Field("oldPassword") oldPassword: String, @Field("newPassword") newPassword: String): Observable<ResponseBody>

    /*** 车辆入场*/
    @Multipart
    @POST("/plant/guard/doCarEntrance")
    fun carEntrance(@Header("token") token: String?, @Part("carId") carId: RequestBody, @Part enterPic: MultipartBody.Part?): Observable<ResponseBody>

    /*** 检查更新*/
    @GET("/common/appCheckUpgrade")
    fun checkUpdate(@Query("curVersion") curVersion: String, @Query("platform") platform: Int? = 1): Call<ResponseBody>


    /*** 检查更新*/
    @GET("/common/appCheckUpgrade")
    fun settingCheckUpdate(@Query("curVersion") curVersion: String, @Query("plateform") plateform: Int? = 1): Observable<ResponseBody>

    /*** 校验是否可拆*/
    @GET("/plant/manufacture/movingProduction")
    fun movingProduction(@Header("token") token: String, @Query("carCode") carCode: String): Call<ResponseBody>


    /*** 生产车辆移库 生产扫描二维码进入后扫描车间二维码*/
    @GET("/plant/manufacture/movWarehouse")
    fun movWarehouse(@Header("token") token: String, @Query("carCode") carCode: String, @Query("warehouseId") warehouseId: String, @Query("weightBeforeDis") weightBeforeDis: String): Call<ResponseBody>

    /*** 档案部 档案部上传图片和视频*/
    @Multipart
    @POST("/plant/manufacture/uploadPictureAll")
    fun uploadVideo(@Header("token") token: String?, @Part file: ArrayList<MultipartBody.Part>): Call<ResponseBody>

    /*** 生产拍照*/
    @Multipart
    @POST("/plant/manufacture/uploadPictureFile")
    fun confirmReceipt(@Header("token") token: String, @Part("carId") carId: RequestBody, @Part picture: MultipartBody.Part): Call<ResponseBody>

    /*** 物料销售列表页面*/
    @GET("/plant/material/materialList")
    fun getMaterialSellList(@Header("token") token: String, @Query("pageNum") pageNum: Int, @Query("pageSize") pageSize: Int): Call<ResponseBody>

    /*** 物料销售申请*/
    @Multipart
    @POST("/plant/material/materialSaleApply")
    fun materialSaleApply(@Header("token") token: String, @Part file: ArrayList<MultipartBody.Part>): Call<ResponseBody>

    /*** 物料销售详情列表*/
    @GET("/plant/material/materialSalesList")
    fun materialSalesList(@Header("token") token: String, @Query("pageNum") pageNum: Int, @Query("pageSize") pageSize: Int): Call<ResponseBody>

    /*** 销售扫码 获取车辆详细信息*/
    @GET("/plant/accessories/carInfo")
    fun carInfo(@Header("token") token: String, @Query("carCode") carCode: String): Call<ResponseBody>

    /*** 销售扫码  有无销售价值 0- 无 1 - 有*/
    @POST("/plant/accessories/preserveValue")
    fun preserveValue(@Header("token") token: String, @Body body: RequestBody): Call<ResponseBody>


    /*** 单车辆已售配件*/
    @GET("/plant/accessories/soldAccessories")
    fun soldAccessories(@Header("token") token: String, @Query("carCode") carCode: String, @Query("pageNum") pageNum: Int, @Query("pageSize") pageSize: Int): Call<ResponseBody>

    /*** 所有车辆已售配件*/
    @GET("/plant/accessories/soldAccessoriesAll")
    fun soldAccessoriesAll(@Header("token") token: String, @Query("pageNum") pageNum: Int, @Query("pageSize") pageSize: Int): Call<ResponseBody>

    /**
     * 物料审核列表
     * 审核结果（0 待审核1 同意 2 拒绝）
     */
    @POST("/plant/audit/getMaterialAudit")
    fun reviewMaterialList(@Header("token") token: String, @Body body: RequestBody): Call<ResponseBody>

    /**
     * 配件审核列表
     * 审核结果（0 待审核1 同意 2 拒绝）
     */
    @POST("/plant/audit/getPartsAudit")
    fun reviewPartsList(@Header("token") token: String, @Body body: RequestBody): Call<ResponseBody>

    /**
     * 报废车审核列表
     * isPass 审核结果（0 待审核1 同意 2 拒绝）
     */
    @POST("/plant/audit/getCarAudit")
    fun reviewCarsList(@Header("token") token: String, @Body body: RequestBody): Call<ResponseBody>


    /*** 配件销售*/
    @POST("/plant/accessories/sellAccessories")
    fun sellAccessories(@Header("token") token: String, @Body body: RequestBody): Call<ResponseBody>

    /**
     * 修改物料审核状态
     * isPass 审核结果（0 待审核1 同意 2 拒绝）
     * auditOpinion 审核意见
     * materialSalesOrderId 订单号
     */
    @POST("/plant/audit/updateMaterialAudit")
    fun changeMaterialStatus(@Header("token") token: String, @Body body: RequestBody): Call<ResponseBody>

    /**
     * 修改配件审核状态
     * isPass 审核结果（0 待审核1 同意 2 拒绝）
     *  * auditOpinion 审核意见
     * materialSalesOrderId 订单号
     */
    @POST("/plant/audit/updatePartsAudit")
    fun changePartStatus(@Header("token") token: String, @Body body: RequestBody): Call<ResponseBody>

    /**
     * 修改车辆审核状态
     * isPass 审核结果（0 待审核1 同意 2 拒绝）
     * auditRemark 审核意见
     * applicationId 订单号
     */
    @POST("/plant/audit/updateCarAudit")
    fun changeCarStatus(@Header("token") token: String, @Body body: RequestBody): Call<ResponseBody>

    /*** 获取该企业所有销售员信息*/
    @GET("/plant/guard/getUserInfoByCompany")
    fun getAllSeller(@Header("token") token: String): Call<ResponseBody>

    /*** 获取仓储 物料入库信息*/
    @GET("/plant/storage/getMaterialInfo")
    fun getStorageMaterial(@Header("token") token: String, @Query("pageNum") pageNum: Int, @Query("pageSize") pageSize: Int): Call<ResponseBody>

    /**
     * 仓储 物料入库确认
     * isIn是否已入库（1是 0否）
     * meterialInNo 入库单号
     */
    @POST("/plant/storage/updateMaterialIn")
    fun storageMaterialInConfirm(@Header("token") token: String, @Body body: RequestBody): Call<ResponseBody>

    /*** 仓储 物料出库列表*/
    @GET("/plant/storage/getMaterialOutStorage")
    fun getStorageMaterialOut(@Header("token") token: String, @Query("pageNum") pageNum: Int, @Query("pageSize") pageSize: Int): Call<ResponseBody>

    /*** 仓储 配件出库列表*/
    @GET("/plant/storage/getPartsOutStorage")
    fun getStoragePartsOut(@Header("token") token: String, @Query("pageNum") pageNum: Int, @Query("pageSize") pageSize: Int): Call<ResponseBody>

    /*** 仓储 配件出库详情 确认*/
    @POST("/plant/storage/partsConfirmOut")
    fun storagePartDetailConfirm(@Header("token") token: String, @Body body: RequestBody): Call<ResponseBody>

    /*** 仓储 物料出库详情 确认*/
    @POST("/plant/storage/materialConfirmOut")
    fun storageMaterialDetailConfirm(@Header("token") token: String, @Body body: RequestBody): Call<ResponseBody>

    /***档案 获取已上传的拆解照片和视频*/
    @GET("/plant/manufacture/fileUrl")
    fun getOldPhotoVideo(@Header("token") token: String, @Query("carCode") carCode: String): Call<ResponseBody>

    /***物料重量输入*/
    @POST("/plant/storage/materialIn")
    fun inputMaterialWeight(@Header("token") token: String, @Body body: RequestBody): Call<ResponseBody>

    /***生产获取物料列表*/
    @GET("/plant/material/getMaterialByIsHandWrite")
    fun getMaterialList(@Header("token") token: String, @Query("pageNum") pageNum: Int, @Query("pageSize") pageSize: Int, @Query("materialName") materialName: String): Call<ResponseBody>

    /***获取所有仓库列表 (仓储)*/
    @GET("/plant/storage/storageInfo")
    fun getStorageList(@Header("token") token: String, @Query("pageNum") pageNum: Int, @Query("pageSize") pageSize: Int): Call<ResponseBody>

    /***根据仓库ID查询车辆信息列表(仓储)*/
    @GET("/plant/storage/carInfoInStorage")
    fun getCarList(@Header("token") token: String, @Query("id") id: Int, @Query("pageNum") pageNum: Int, @Query("pageSize") pageSize: Int, @Query("ownerPlate") ownerPlate: String): Call<ResponseBody>

    /***获取待初验车辆列表(档案)*/
    @GET("/plant/archive/InspectionCarList")
    fun getFirstCarList(@Header("token") token: String, @Query("pageNum") pageNum: Int, @Query("pageSize") pageSize: Int, @Query("s") s: String): Call<ResponseBody>

    /***获取待二验车辆列表(档案)*/
    @GET("/plant/archive/recheckCarList")
    fun getSecondCarList(@Header("token") token: String, @Query("pageNum") pageNum: Int, @Query("pageSize") pageSize: Int, @Query("carNumber") carNumber: String): Call<ResponseBody>

    /**修改车辆信息(初验后,二验前)*/
    @FormUrlEncoded
    @POST("/plant/archive/changeCarInfo")
    fun changeCarInfo(
        @Header("token") token: String,
        @Field("carId") carId: String,
        @Field("carOwner") carOwner: String,
        @Field("ownerPlate") ownerPlate: String,
        @Field("carVin") carVin: String,
    ): Call<ResponseBody>

    /***获取待拍照车辆列表(档案)*/
    @GET("/plant/manufacture/getCarInfoList")
    fun getCarWaitPhotographed(@Header("token") token: String, @Query("pageNum") pageNum: Int, @Query("pageSize") pageSize: Int, @Query("carNumber") carNumber: String): Call<ResponseBody>


    /***待初检车辆列表(仓储)*/
    @GET("/plant/storage/carInspection")
    fun getVehicleInspectionList(@Header("token") token: String, @Query("carPlate") carPlate: String, @Query("pageNum") pageNum: Int, @Query("pageSize") pageSize: Int): Call<ResponseBody>

    /***按车牌获取待初检车辆*/
    @GET("/plant/archive/getInitialInspectionCar")
    fun getFirstExamineCarByCarPlate(@Header("token") token: String, @Query("carPlate") carPlate: String): Call<ResponseBody>

    /***查看物料照片(审核)*/
    @GET("/plant/audit/materialPicture")
    fun getMaterialPhoto(@Header("token") token: String, @Query("materialSalesNo") materialSalesNo: String): Call<ResponseBody>

    /***物料入库取消(仓储) 取消固定传2*/
    @GET("/plant/storage/cancelMaterialIn")
    fun materialInCancel(@Header("token") token: String, @Query("materialInNo") materialInNo: String, @Query("isIn") isIn: String): Call<ResponseBody>
    /*****************档案***************/
    /**手续管理列表*/
    @GET("/plant/file/info")
    fun fileManagerList(
        @Query("s") search: String,
        @Query("pageNum") pageNum: Int, @Query("pageSize") pageSize: Int,
        @Header("token") token: String = userToken,
    ): Call<ResponseBody>

    /**批量发放回收证明*/
    @FormUrlEncoded
    @POST("/plant/file/batchGiveRecycleProof")
    fun batchGiveRecycleProof(
        @Field("carIds") carIds: List<String>,
        @Header("token") token: String = userToken,
    ): Call<ResponseBody>

    /**批量发放注销证明*/
    @FormUrlEncoded
    @POST("/plant/file/batchGiveCancellationProof")
    fun batchGiveCancellationProof(
        @Field("carIds") carIds: List<String>,
        @Header("token") token: String = userToken,
    ): Call<ResponseBody>

//    /**批量手续发放  手续发放方式 1-邮寄 2-车主自取 3-业务领取*/
//    @GET("/plant/file/batchGiveProcedure")
//    fun batchGiveProcedure(
//        @Query("carIds") carIds: List<String>,
//        @Query("giveMethod") giveMethod: String,
//        @Header("token") token: String = userToken,
//    ): Call<ResponseBody>
    //TODO
    /**批量手续发放  手续发放方式 1-邮寄 2-车主自取 3-业务领取*/
    @Multipart
    @POST("/plant/file/apiGiveProcedure")
    fun batchGiveProcedure(
        @Part file: ArrayList<MultipartBody.Part>,
        @Header("token") token: String = userToken,
    ): Call<ResponseBody>

    /**档案手续管理 详情*/
    @GET("/plant/file/detail")
    fun fileManagerDetail(
        @Query("carId") carId: String,
        @Header("token") token: String = userToken,
    ): Call<ResponseBody>

    /**档案管理中的详情提交*/
    @POST("/plant/file/update")
    fun fileManagerDetailConfirm(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Call<ResponseBody>

    /**档案管理中的详情提交*/
    @GET("/plant/file/procedureRemark")
    fun fileManagerDetailConfirmRemark(
        @Query("carId") carId: String,
        @Query("remark") remark: String,
        @Header("token") token: String = userToken,
    ): Call<ResponseBody>

    /**获取入场照片*/
    @GET("/plant/file/listCarPicture")
    fun fileManagerInPhotos(
        @Query("carId") carId: String,
        @Header("token") token: String = userToken,
    ): Call<ResponseBody>

    /**获取入场视频*/
    @GET("/plant/file/listCarVideo")
    fun fileManagerInVideo(
        @Query("carId") carId: String,
        @Header("token") token: String = userToken,
    ): Call<ResponseBody>
    /*****************客服***************/
    /**订单数统计*/
    @GET("/center/disOrder/count")
    fun serviceOrderCount(
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**总订单管理*/
    @GET("/center/disOrder/info")
    fun serviceAllOrder(
        @Header("token") token: String,
        @Query("s") search: String?,
        @Query("status") status: String?,
        @Query("orderSource") orderSource: String?,
        @Query("pageNum") pageNum: Int, @Query("pageSize") pageSize: Int,
    ): Call<ResponseBody>

    /**意向订单列表*/
    @GET("/center/disOrder/talk")
    fun serviceTalkOrder(
        @Header("token") token: String,
        @Query("s") search: String?,
        @Query("orderSource") orderSource: String?,
        @Query("pageNum") pageNum: Int, @Query("pageSize") pageSize: Int,
    ): Call<ResponseBody>

    /**预订单列表*/
    @GET("/center/disOrder/prepare")
    fun servicePreOrder(
        @Header("token") token: String,
        @Query("s") search: String?,
        @Query("orderSource") orderSource: String?,
        @Query("pageNum") pageNum: Int, @Query("pageSize") pageSize: Int,
    ): Call<ResponseBody>

    /**订单详情*/
    @GET("/center/disOrder/detail")
    fun serviceOrderDetail(
        @Header("token") token: String,
        @Query("suborderId") suborderId: String,
        @Query("enterMode") enterMode: String?,
    ): Call<ResponseBody>

    /**显示收款方式*/
    @GET("/center/disOrder/paymentMethod")
    fun serviceDetailPayType(
        @Header("token") token: String,
        @Query("suborderId") suborderId: String,
    ): Call<ResponseBody>

    /**保存现金收款方式*/
    @POST("/center/carOwner/saveCashPay")
    fun serviceSaveCashPay(
        @Header("token") token: String,
        @Body body: RequestBody
    ): Call<ResponseBody>

    /**保存现金收款方式*/
    @Multipart
    @POST("/center/carOwner/saveWxPay")
    fun serviceSaveWxPay(
        @Header("token") token: String,
        @Part file: ArrayList<MultipartBody.Part>
    ): Call<ResponseBody>

    @POST("/center/carOwner/saveAliPay")
    fun serviceSaveAliPay(
        @Header("token") token: String,
        @Body body: RequestBody
    ): Call<ResponseBody>

    @POST("/center/carOwner/saveCardPay")
    fun serviceBank(
        @Header("token") token: String,
        @Body body: RequestBody
    ): Call<ResponseBody>

    /**物流列表*/
    @GET("/center/cooperation/company/list")
    fun serviceTrackingList(
        @Header("token") token: String,
        @Query("isCorrelated") isCorrelated: Boolean = true,
        @Query("type") type: String = "LOGISTICS",
    ): Call<ResponseBody>

    /**提交订单*/
    @POST("/center/disOrder/apiAdd")
    fun serviceOrderConfirm(
        @Header("token") token: String,
        @Body body: RequestBody
    ): Call<ResponseBody>

    /**取消订单*/
    @FormUrlEncoded
    @POST("/center/disOrder/add")
    fun serviceOrderCancel(
        @Header("token") token: String,
        @Field("suborderId") suborderId: String,
        @Field("carId") carId: String,
        @Field("remark") remark: String,
        @Field("status") status: String = "0",
    ): Call<ResponseBody>

    /**待沟通订单*/
    @FormUrlEncoded
    @POST("/center/disOrder/add")
    fun serviceOrderWaitTalk(
        @Header("token") token: String,
        @Field("suborderId") suborderId: String,
        @Field("carId") carId: String,
        @Field("status") status: String = "4",
    ): Call<ResponseBody>

    /**获取订单回访记录*/
    @GET("/center/disOrder/history/{suborderId}")
    fun serviceReturnHistory(
        @Path("suborderId") suborderId: String,
        @Header("token") token: String = userToken,
    ): Call<ResponseBody>

    /**添加回访记录*/
    @POST("/center/disOrder/add/visit")
    @FormUrlEncoded
    fun serviceAddReturnMessage(
        @Field("suborderId") suborderId: String,
        @Field("remark") remark: String,
        @Header("token") token: String = userToken,
    ): Call<ResponseBody>

    /**获取物流信息列表*/
    @GET("/center/logistics/info")
    fun serviceLogisticsList(
        @Query("s") search: String,
        @Query("status") status: String,
        @Query("pageNum") pageNum: Int, @Query("pageSize") pageSize: Int,
        @Header("token") token: String = userToken,
    ): Call<ResponseBody>

    /**获取物流信息详情*/
    @GET("/center/logistics/detail")
    fun serviceLogisticsDetail(
        @Query("lgsId") suborderId: String,
        @Header("token") token: String = userToken,
    ): Call<ResponseBody>

    /*****************收车管理***************/
    /**单个车辆信息录入*/
    @POST("/car/input")
    fun inputCarInfoSingle(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    /**收车单列表*/
    @GET("/car/list")
    fun getCarList(
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**查询车辆*/
    @GET("/car/list")
    fun searchCar(
        @Query("pageNum") pageNum: Int,
//        @Query("carCode") carCode: String? = null,
        @Query("s") s: String? = null,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**登记物流信息*/
    @POST("/car/saveLogisticsInfo")
    fun inputLogistics(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**完善车辆信息*/
    @POST("/car/addCarInfo")
    fun inputCarInfoDetail(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    /**车辆详情*/
    @GET("/car/{carId}")
    fun carDetail(
        @Path("carId") carId: String,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**电池入库单详情*/
    @GET("/powerBattery/in/{orderId}")
    fun batteryDetail(
        @Path("orderId") orderId: String,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**动力电池详情*/
    @GET("/powerBattery/info/{pbId}")
    fun powerBatteryDetail(
        @Path("pbId") pbId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>
    /**动力电池详情*/
    @GET("/powerBattery/ifUpdate")
    fun ifUpdate(
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>
    /**电池详情*/
    @GET("/powerBattery/dismantle/{pbDismantleId}")
    fun handleBatteryDetail(
        @Path("pbDismantleId") pbDismantleId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**电池详情*/
    @GET("/powerBattery/dismantle/info/{pbId}")
    fun handleBatteryDetailV2(
        @Path("pbId") pbId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    @GET("/bulkParts/info/{orderId}")
    fun blukPartDetail(
        @Path("orderId") orderId: String,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    @GET("/car/check/{carId}")
    fun carDetailHasImage(
        @Path("carId") carId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**零件拆解单详情*/
    @GET("/parts/dismantle/{orderId}")
    fun partHandlerDetail(
        @Path("orderId") orderId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**收车单列表*/
    @GET("/car/list")
    fun waitFirstCheck(
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Query("carCheck") carCheck: Int = 0,//初检状态，固定传0
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**待过磅列表*/
    @GET("/car/list")
    fun waitGetWidget(
        @Query("s") s: String? = null,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Query("pound") pound: Int = 0,//过磅状态默认传0
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**待初检列表*/
    @GET("/car/listCheck")
    fun waitFirstCheck(
        @Query("s") s: String? = null,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Query("carCheck") carCheck: Int = 0,//初检状态，固定传0
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**预处理车辆列表*/
    @GET("/car/list")
    fun waitPerHandler(
        @Query("s") s: String? = null,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Query("pretreatment") pretreatment: Int = 0,//预处理状态，固定传0
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**待入库列表*/
    @GET("/car/listEntrance")
    fun waitIn(
        @Query("s") s: String? = null,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
//        @Query("entrance") entrance: Int = 0,//登记入库，固定传0
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**登记入库*/
    @POST("/car/entrance")
    fun carInWarehouse(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**车辆过磅*/
    @POST("/car/pound")
    fun carPound(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**电池过磅*/
    @POST("/powerBattery/in/pound")
    fun batteryPound(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**初验*/
    @POST("/car/check")
    fun firstCheck(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**排油水*/
    @POST("/car/oilWaterDrainage/{carId}")
    fun handlerWater(
        @Path("carId") carId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**拆电池*/
    @POST("/powerBattery/disassemble")
    fun handlerBattery(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    /**动力电池拆解完成*/
    @POST("/powerBattery/dismantle/finish")
    fun powerBatteryHandlerFinish(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**动力电池拆解完成*/
    @POST("/powerBattery/dismantle/battery/finish")
    fun powerBatteryHandlerFinishV2(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**动力电池拆解单 - 电池列表*/
    @GET("/powerBattery/dismantle/battery/list")
    fun batteryHandlerListV2(
        @Query("s") s: String? = null,
        @Query("pageNum") pageNum: Int,
        @Query("dismantle") dismantle: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**动力电池拆解单 - 电池列表(我的 我拆的)*/
    @GET("/powerBattery/dismantle/battery/listMyOperated")
    fun myBatteryHandlerList(
        @Query("s") s: String? = null,
        @Query("pageNum") pageNum: Int,
        @Query("dismantle") dismantle: Int?=null,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    /**车辆可拆解列表*/
    @GET("/car/listDetachable")
    fun carCanHandlerList(
        @Query("s") s: String? = null,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    /**拆解单列表*/
    @GET("/car/dismantle/list")
    fun carHandlerOverList(
        @Query("s") s: String? = null,
        @Query("pageNum") pageNum: Int,
        @Query("dismantle") dismantle: Int,//1-拆解中 2-拆解完成
        @Query("isFlag") isFlag: Int = 1,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**新建拆解单*/
    @POST("/car/dismantle/add")
    fun createCarHandlerOrder(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**查询可拆电池包*/
    @GET("/powerBattery/listDetachable")
    fun batteryCanHandler(
        @Query("s") s: String? = null,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**可出库电池 - 列表*/
    @GET("/powerBattery/listOutable")
    fun batteryCanHandlerV2(
        @Query("s") s: String? = null,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    @GET("/powerBattery/list")
    fun powerBatteryList(
       // @Query("batteryStatus") batteryStatus: Int,//电池状态 0-待入库 1-入库 2-拆解 3-出库
        @Query("s") s: String? = null,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Query("returnStatus") returnStatus:Int ?=null,
        @Query("returnUserName") returnUserName:String ?=null,//审批人
        @Query("applyReturnName") applyReturnName:String ?=null,//申请人
        @Query("batteryStatus") batteryStatus:Int ?=null,//电池状态 0-待入库 1-入库 2-拆解 3-出库
        @Query("dismantle") dismantle:Int ?=null,//电池状态 0-未拆解
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>
    @POST("/powerBattery/pbApply")
    fun pbApply(
        @Body body: RequestBody,@Query("returnStatus")returnStatus:Int,@Query("returnUserName")returnUserName:String?=null,@Header("token") token: String = userToken):Observable<ResponseBody>
    /**零部件列表*/
    @GET("/partsinfo/list")
    fun partOutList(
        @Query("status") status: Int,
        @Query("s") s: String? = null,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**可出库零件 - 列表*/
    @GET("/parts/listDetachable")
    fun partOutListV3(
        @Query("s") s: String? = null,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    /**可出库零件 - 列表*/
    @GET("/parts/listOutable")
    fun partOutListV2(
        @Query("s") s: String? = null,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**新建动力电池拆解单*/
    @FormUrlEncoded
    @POST("/powerBattery/{pbId}/dismantle/add")
    fun createBatteryHandlerOrder(
        @Path("pbId") pbId: Int,
        @Field("plainFinishTime") plainFinishTime: String,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    @POST("/powerBattery/dismantle/add")
    fun createBatteryHandlerOrderV2(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**新建零件拆解*/
    @POST("/parts/dismantle/add")
    fun createPartHandlerOrder(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**动力电池拆解单*/
    @GET("/powerBattery/dismantle/list")
    fun batteryHandlerList(
        @Query("s") s: String? = null,
        @Query("dismantleStatus") dismantleStatus: Int? = null,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    @POST("/powerBattery/dismantle/finish")
    fun batteryHandlerOver(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**车辆拆解完成*/
    @POST("/car/dismantle/finish")
    fun carHandlerFinish(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**车辆拆配件拆解清单*/
    @GET("/car/dismantle/detail/{carDismantleId}")
    fun carCanHandlerPart(
        @Path("carDismantleId") carDismantleId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**毁型拍照列表*/
    @GET("/car/dismantle/car/list")
    fun destroyPhotoList(
        @Query("s") s: String? = null,
        @Query("destructivePhotostatus") destructivePhotostatus: Int?,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**毁型拍照列表V2*/
    @GET("/car/dismantle/car/listMyOperated")
    fun destroyPhotoListV2(
        @Query("s") s: String? = null,
        @Query("destructivePhotostatus") destructivePhotostatus: Int?,//0可拍照列表 显示拍照按钮 1 不显示拍照按钮
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**查询毁型拍照*/
    @GET("/car/destructivePhotoList")
    fun checkCarImage(
        @Query("carId") carId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    /**上传毁型照片*/
    @POST("/car/destructivePhoto")
    fun uploadDestroyImage(
        @Body requestBody: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**上传毁型照片*/
    @FormUrlEncoded
    @POST("/car/uploadPicture")
    fun uploadDestroyImageV2(
        @Field("carId") carId: Int,
        @Field("picUrls") picUrls: List<String>,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**散件录入*/
    @POST("/bulkParts/add")
    fun partInput(
        @Body requestBody: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**散件录入编辑*/
    @POST("/bulkParts/update")
    fun partInputUpdate(
        @Body requestBody: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**散件入库查询*/
    @GET("/bulkParts/list")
    fun partInWarehouse(
        @Query("orderNo") s: String? = null,
        @Query("pound") pound: Int? = null,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**散件过磅*/
    @POST("/bulkParts/pound")
    fun partWeight(
        @Body requestBody: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    @GET("/parts/category/selectItem")
    fun getPartMenu(
        @Query("dictId") dictId: Int = 2,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    @GET("/dict/data/list")
    fun getDictionaryMenu(
        @Query("dictCode") dictCode: String,
        @Query("doPage") doPage: Int = 0,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    @GET("/parts/category/selectItem")
    fun getDictionaryMenuV2(
        @Query("isCheckParts") isCheckParts: Int? = null,//是否初检零件 1-是 0-否
        @Query("isDestructionParts") isDestructionParts: Int? = null,//是否毁型零件 1-是 0-否
        @Query("isBulkParts") isBulkParts: Int? = null,//是否散件零件 1-是 0-否
        @Query("energy") energy: Int? = null,//能源类型 1-燃油车 2-电动车 3-油电混合
        @Query("doPage") doPage: Int = 0,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**根据VIN获取车型信息*/
    @FormUrlEncoded
    @POST("/carBasic/parseVin")
    fun useVinGetCarModel(
        @Field("vin") vin: String,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    /**车牌 VIN查重*/
    @GET("/car/checkCarVin")
    fun vinPlateExitsCheck(
        @Query("carVin") carVin: String,
        @Query("carPlate") carPlate: String,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    /**动力电池入库单查询*/
    @GET("/powerBattery/in/list")
    fun powerBatteryInWarehouse(
        @Query("pbInOrderNo") pbInOrderNo: String,
        @Query("pageNum") pageNum: Int,
        @Query("status") status: Int?,//入库单状态 0-待入库 1-已入库
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**零部件出库列表*/
    @GET("/parts/out/list")
    fun partOut(
        @Query("outOrderNo") outOrderNo: String,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**零部件拆解单查询*/
    @GET("/parts/dismantle/list")
    fun partHandlerList(
        @Query("s") s: String,
        @Query("pageNum") pageNum: Int,
        @Query("status") status: Int,//状态 1-拆解中 2-拆解完成
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**动力电池出库单查询*/
    @GET("/powerBattery/out/list")
    fun powerBatteryOutWarehouse(
        @Query("outOrderNo") outOrderNo: String,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**散件信息补录 - 列表*/
    @GET("/powerBattery/listBulk")
    fun powerBatteryBulk(
        @Query("batterySelfCode") batterySelfCode: String,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    /**新建动力电池散件入库单*/
    @POST("/powerBattery/in/add")
    fun powerBatteryInWarehouseSingle(
        @Body requestBody: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**新建动力电池散件入库单*/
    @POST("/powerBattery/in/update")
    fun powerBatteryInWarehouseSingleUpdate(
        @Body requestBody: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**动力电池/散件编辑*/
    @GET("/powerBattery/out/{outOrderId}")
    fun powerBatteryOutDetail(
        @Path("outOrderId") outOrderId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**零部件出库单详情*/
    @GET("/parts/out/{outOrderId}")
    fun partOutDetail(
        @Path("outOrderId") outOrderId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**新建动力电池出库单*/
    @POST("/powerBattery/out/add")
    fun powerOutSubmit(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**零部件出库单*/
    @POST("/parts/out/add")
    fun partOutSubmit(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**零件拆解完成*/
    @POST("/parts/dismantle/finish/{orderId}")
    fun partHandlerSubmit(
        @Path("orderId") orderId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**零件拆解完成*/
    @POST("/parts/dismantle/finish/")
    fun partHandlerSubmitV2(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**物料库存列表*/
    @GET("/material/stock/list")
    fun materialWarehouse(
//        @Query("outOrderNo") outOrderNo: String,
//        @Query("pageNum") pageNum: Int,
//        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**物料历史记录*/
    @GET("/material/stock/history")
    fun materialHistory(
        @Query("stockId") stockId: Int,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**物料库存盘点*/
    @POST("/material/stock/check")
    fun materialCheck(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**物料列表 下拉框*/
    @GET("material/list")
    fun materialChildList(
        @Query("doPage") doPage: Int = 0,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**物料出库 新建物料出库单(废弃)*/
    @POST("/material/out/add")
    fun materialOutSubmit(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**物料出库 新建物料出库单(新))*/
    @POST("/out/add")
    fun materialOutSubmitV2(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**物料出库 新建物料出库单(新))*/
    @POST("/out/addDraft")
    fun materialOutSubmitToDraft(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**物料出库草稿单更新*/
    @POST("/out/updateDraft")
    fun materialDraftUpdate(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**物料出库单二次提交(草稿/驳回)*/
    @POST("/out/reSubmit")
    fun materialOutSecond(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**物料出库单 (我的待审批编辑)**/
    @POST("/out/updateAudit")
    fun materialOutSecondUpdate(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    @GET("/material/out/list")
    fun materialOutSearch(
        @Query("bizNo") string: String? = null,
        @Query("pageNum") pageNum: Int,
        @Query("outType") outType: Int? = null,//出库类型 1-销售出库 2-借用出库 3-其他出库
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**物料详情*/
    @GET("/material/out/item/{outOrderId}")
    fun materialOutDetail(
        @Path("outOrderId") outOrderId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**散件信息补录*/
    @POST("/powerBattery/update")
    fun batteryInputOther(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**拆解单列表*/
    @GET("/car/dismantle/detailBy/{carDismantleId}")
    fun carDismantleList(
//        @Query("s") s: String,
//        @Query("pageNum") pageNum: Int,
        @Path("carDismantleId") carDismantleId: Int,
//        @Query("pageSize") pageSize: Int = 20,
        @Query("doPage") pageSize: Int = 0,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**我操作过的车辆*/
    @GET("/car/listMyOperated")
    fun myHandlerCar(
        @Query("s") s: String,
        @Query("flowType") flowType: Int,//流程类型 1-预录入 2-登记入库 3-过磅 4-初检 5-预处理 6-新建拆解 7-完成拆解 8-毁型拍照
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**我创建的拆解单*/
    @GET("/car/dismantle/listMyCreated")
    fun myCreateHandlerOrder(
        @Query("s") s: String,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**我的拆解单列表*/
//    @GET("/powerBattery/listMyOperated")
    @GET("/powerBattery/dismantle/battery/listMyOperated")
    fun myPowerBattery(
        @Query("s") s: String,
        @Query("pageNum") pageNum: Int,
        @Query("batteryStatus") batteryStatus: Int? = null,//电池状态 0-待入库 1-已入库 3-已出库
        @Query("dismantle") dismantle: Int? = null,//是否拆解 0-未拆解 1-拆解中 2-已拆解
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**我的散件补录(电池)*/
    @GET("/powerBattery/listBulkMyOperated")
    fun myBatteryInputAgain(
        @Query("batterySelfCode") batterySelfCode: String,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**电池散件入库单待办列表查询*/
    @GET("/powerBattery/in/listTodo/{type}")
    fun powerBatteryWaitIn(
        @Path("type") type:Int,//查询类型 2-待过磅 3-待入库
        @Query("s") s: String,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /***/
    @GET("/powerBattery/in/listMyOperated/{type}")
    fun mineInWaitWidget(
        @Path("type") type:Int,//查询类型，不传等价于传1, 【1-我创建的 2-我过磅的 3-我入库的】
        @Query("s") s: String,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    /**我的过磅列表 (电池)*/
    @GET("/powerBattery/in/listPoundMyOperated")
    fun myBatteryPound(
        @Query("pbInOrderNo") pbInOrderNo: String,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**我的入库列表 散件录入(电池)*/
    @GET("/powerBattery/in/listMyOperated")
    fun myBatteryInput(
        @Query("pbInOrderNo") pbInOrderNo: String,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>



    /**我的散件录入/过磅(配件)*/
    @GET("/bulkParts/listMyOperated")
    fun myPartInputPound(
        @Query("orderNo") orderNo: String,
        @Query("pageNum") pageNum: Int,
        @Query("pound") pound: Int? = null,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    /**我的散件录入/过磅(配件)*/
    @GET("/bulkParts/listMyOperated/{operateType}")
    fun myPartInputPoundV2(
        @Path("operateType")operateType:Int,//1-散件录入 2-散件过磅】
        @Query("orderNo") orderNo: String,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**我的新建拆解单/拆解单 (配件)*/
    @GET("/parts/dismantle/listMyOperated")
    fun myPartHandlerOrder(
        @Query("s") s: String,
        @Query("pageNum") pageNum: Int,
        @Query("status") status: Int,//状态 1-拆解中 2-拆解完成 (根据状态查询 新建是1 我的拆解单列表是2)
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**我的新建拆解单列表(配件)*/
    @GET("/parts/listMyOperated")
    fun myPartHandlerList(
        @Query("s") s: String,
        @Query("pageNum") pageNum: Int,
        @Query("status") status: Int = 3,//状态 1-拆解中 2-拆解完成 (根据状态查询 新建是1 我的拆解单列表是2)
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**我的出库列表(配件)*/
    @GET("/parts/out/listMyOperated")
    fun myPartOut(
        @Query("s") s: String,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Query("status") status: Int = 4,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**放行条新建草稿*/
    @POST("/releaseStrip/addDraft")
    fun releaseStripAddDraft(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    /**放行条申请*/
    @POST("/releaseStrip/add")
    fun releaseStripAdd(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**放行条申请(草稿单重新提交草稿)*/
    @POST("/releaseStrip/updateDraft")
    fun releaseStripAddDarftAgain(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**放行条二次提交审批(草稿/驳回)*/
    @POST("/releaseStrip/reSubmit")
    fun releaseStringSecond(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**放行条二次提交审批(待审核的单子重新提交)*/
    @POST("/releaseStrip/updateAudit")
    fun releaseStringSecondUpdate(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**放行条审批*/
    @GET("/releaseStrip/list")
    fun releaseStripList(
        @Query("s") s: String,
        @Query("pageNum") pageNum: Int,
        @Query("status") status: Int,//放行条状态 0-新建 1-待审批 2-已审批
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**放行条详情*/
    @GET("/releaseStrip/{stripId}")
    fun releaseStrip(
        @Path("stripId") stripId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**放行条审批*/
    @FormUrlEncoded
    @POST("/releaseStrip/{stripId}/audit")
    fun releaseStripCheck(
        @Path("stripId") stripId: Int,
        @Field("status") status: Int,
        @Field("msg") msg: String? = null,
        @Field("signUrl") signUrl: String? = null,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**出库审批*/
    @FormUrlEncoded
    @POST("/out/{outOrderId}/audit")
    fun outCheckSubmit(
        @Path("outOrderId") outOrderId: Int,
        @Field("status") status: Int,
        @Field("msg") msg: String? = null,
        @Field("signUrl") signUrl: String? = null,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**待我审批的*/
    @GET("/releaseStrip/listMyAudit")
    fun releaseStripListMyAudit(
        @Query("s") s: String,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**待我审批的*/
    @GET("/releaseStrip/listMyAudited")
    fun releaseStripListMyAuditFinish(
        @Query("s") s: String,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**我创建的放行条申请*/
    @GET("/releaseStrip/listMyCreated")
    fun releaseStripListMyCreated(
        @Query("s") s: String,
        @Query("pageNum") pageNum: Int,
        @Query("status") status: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**删除放行草稿*/
    @POST("/releaseStrip/removeDraft/{stripId}")
    fun deleteMyDraft(
        @Path("stripId") stripId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**出库单查询(我的审批)*/
    @GET("/out/list/{searchType}")
    fun commonOutCheck(
        @Path("searchType") searchType: Int,//1-我创建的 2-我审批的
        @Query("s") s: String,
        @Query("pageNum") pageNum: Int,
        @Query("outMethod") outMethod: Int,//出库方式 1-电池 2-零件 3-物料(app只有物料)
        @Query("outType") outType: Int ,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    /**出库单查询(我的审批)*/
    @GET("/out/list/{searchType}")
    fun outCheckList(
        @Path("searchType") searchType: Int,//1-我创建的 2-我审批的
        @Query("s") s: String,
        @Query("pageNum") pageNum: Int,
        @Query("status") status: Int,//出库单状态 0-新建 1-待审批 2-已审批
        @Query("pageSize") pageSize: Int = 20,
        @Query("outMethod") outMethod: Int = 3,//出库方式 1-电池 2-零件 3-物料(app只有物料)
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>
    /**出库单查询(我的审批)看所有*/
    @GET("/out/list/{searchType}")
    fun outCheckListAll(
        @Path("searchType") searchType: Int,//1-我创建的 2-我审批的
        @Query("s") s: String,
        @Query("pageNum") pageNum: Int,
        @Query("status") status: Int,//出库单状态 0-新建 1-待审批 2-已审批
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**出库单查询 通用*/
    @GET("/out/list")
    fun commonOut(
        @Query("s") s: String,
        @Query("pageNum") pageNum: Int,
        @Query("outType") outType: Int,//出库方式 1-电池 2-零件 3-物料
        @Query("status") status: Int = 2,//出库单状态 0-新建 1-待审批 2-已审批
        @Query("outMethod") outMethod: Int = 1,//出库方式 1-电池 2-零件 3-物料
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    /**出库单查询(我的提交)*/
    @GET("/out/list/{searchType}")
    fun outCheckListMySubmit(
        @Path("searchType") searchType: Int,//1-我创建的 2-我审批的
        @Query("s") s: String,
        @Query("pageNum") pageNum: Int,
        @Query("status") status: Int,//出库单状态 0-新建 1-待审批 2-已审批
        @Query("pageSize") pageSize: Int = 20,
        @Query("outMethod") outMethod: Int = 3,//出库方式 1-电池 2-零件 3-物料(app只有物料)
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**出库单详情*/
    @GET("/out/{outOrderId}")
    fun outMaterialDetail(
        @Path("outOrderId") outOrderId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**查询关联出库单的下拉选项*/
    @GET("/out/listCorrelationItem")
    fun listCorrelationItem(
        @Query("s") s: String,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int = 20,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**获取部门成员*/
    @GET("/urm_v3/department/user")
    fun getDepartmentUser(
        @Query("userId") userId: Int = MyBaseApplication.userId,
        @Query("hasDepartment") hasDepartment: Boolean = true,
        @Query("isResponseman") isResponseman: Boolean = true,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**查询所有部门*/
    @GET("/urm_v3/department/all")
    fun getAllDepartment(
        @Query("userId") userId: Int = MyBaseApplication.userId,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    /**登录后获取用户授权菜单*/
    @GET("/user/menu")
    fun getUserMenu(
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>



    /**电池散件入库单确认入库*/
    @POST("/powerBattery/in/confirm")
    fun powerBatterInConfirm(
        @Body body: RequestBody,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    /**小红点 车**/
    @GET("/car/terms")
    fun getPointCar(
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**小红点 电池**/
    @GET("/powerBattery/terms")
    fun getPointBattery(
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>
    /**小红点 配件**/
    @GET("/parts/terms")
    fun getPointPart(
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>
    /**小红点 审批**/
    @GET("/audit/terms")
    fun getPointAudit(
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**零件搜索**/
    @GET("/parts/list")
    fun getPartsList(
        @Query("s") s: String,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    /**零件搜索**/
    @DELETE("/car/delete")
    fun deleteCar(
        @Query("carId") carId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /****/
    @DELETE("/car/dismantle/delete")
    fun deleteDismantle(
        @Query("carDismantleId")  carDismantleId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**删除散件入库**/
    @DELETE("/powerBattery/delete")
    fun deletePowerBattery(
        @Query(" pbId")   pbId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**删除散件信息补录**/
    @DELETE("/powerBattery/in/delete")
    fun deleteInPowerBattery(
        @Query(" orderId")   orderId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**删除散件信息补录**/
    @DELETE("/out/delete")
    fun deleteOut(
        @Query("outOrderId")   outOrderId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>


    /**删除散件信息补录**/
    @DELETE("/parts/delete")
    fun deleteParts(
        @Query("partsId")   partsId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    /**删除我建的 待审批的 可删**/
    @DELETE("/parts/dismantle/delete")
    fun deletePartsDismantle(
        @Query("orderId")   orderId: Int,
        @Header("token") token: String = userToken,
    ): Observable<ResponseBody>

    //忘记密码
    @FormUrlEncoded
    @PUT("/urm_v3/user/resetPassword")
    fun forgetPassword(@Field("telephone") telephone: String, @Field("code") code: String, @Field("password") password: String): Call<ResponseBody>



    //获取验证码
    @POST("/urm_v3/system/codeSms/{telephone}/PASSWORD_FORGET")
    fun getAuth(@Path("telephone") telephone: String): Call<ResponseBody>
}
